$(document).ready(function() {

	//
	// Ensure links that go to "#" don't do anything bad
	//
	$("a[href='#'], a.ajax_loader").attr('onclick', 'null_func();return false');
	
	
	//
	// Auto-focus
	//
	$('#focus_me > input').focus();

	//
	// Notice Slide-up for Admin Pages
	//
	adminSlideUpTimer = $.timer(6000, function() {
		$('#greydev_admin div.notices, #greydev_admin div.notices_bg').slideUp('slow');
	});

});

// ------------------------------------------------------------
 
/*
 * For # links
 */
function null_func() { }

// ------------------------------------------------------------

/*
 * jQuery Timer Plugin
 * http://www.evanbot.com/article/jquery-timer-plugin/23
 *
 * @version      1.0
 * @copyright    2009 Evan Byrne (http://www.evanbot.com)
 */

jQuery.timer = function(time,func,callback){
	var a = {timer:setTimeout(func,time),callback:null}
	if(typeof(callback) == 'function'){a.callback = callback;}
	return a;
};

jQuery.clearTimer = function(a){
	clearTimeout(a.timer);
	if(typeof(a.callback) == 'function'){a.callback();};
	return this;
};